package cn.huolabao.model;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@ApiModel(value = "cn-huolabao-model-SysUser")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "sys_user")
public class SysUser implements Serializable {
    /**
     * 用户ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "用户ID")
    private Integer id;

    /**
     * 用户名
     */
    @TableField(value = "username")
    @ApiModelProperty(value = "用户名")
    private String username;

    /**
     * 用户密码
     */
    @TableField(value = "`password`")
    @ApiModelProperty(value = "用户密码")
    private String password;


    @TableField(value = "tenant_id")
    @ApiModelProperty(value = "")
    private int tenantId;

    @TableField(value = "dept_id")
    @ApiModelProperty(value = "")
    private Integer deptId;

    private String deptName;


    @TableField(value = "job_id")
    @ApiModelProperty(value = "")
    private Integer jobId;

    /**
     * 用户状态
     */
    @TableField(value = "`status`")
    @ApiModelProperty(value = "用户状态")
    private Integer status;

    /**
     * 手机号
     */
    @TableField(value = "phone")
    @ApiModelProperty(value = "手机号")
    private String phone;

    /**
     * 邮箱
     */
    @TableField(value = "email")
    @ApiModelProperty(value = "邮箱")
    private String email;

    /**
     * 用户性别
     */
    @TableField(value = "sex")
    @ApiModelProperty(value = "用户性别")
    private Byte sex;

    /**
     * 登录IP
     */
    @TableField(value = "login_ip")
    @ApiModelProperty(value = "登录IP")
    private String loginIp;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    /**
     * 逻辑删除（0：未删除 1：删除）
     */
    @TableField(value = "is_delete")
    @ApiModelProperty(value = "逻辑删除（0：未删除 1：删除）")
    private Integer isDelete;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_USERNAME = "username";

    public static final String COL_PASSWORD = "password";

    public static final String COL_SALT = "salt";

    public static final String COL_TENANT_ID = "tenant_id";

    public static final String COL_DEPT_ID = "dept_id";

    public static final String COL_JOB_ID = "job_id";

    public static final String COL_STATUS = "status";

    public static final String COL_PHONE = "phone";

    public static final String COL_EMAIL = "email";

    public static final String COL_SEX = "sex";

    public static final String COL_LOGIN_IP = "login_ip";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_IS_DELETE = "is_delete";

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }
}